package com.lonty.intelligence.mapper;

import com.lonty.intelligence.model.MicroDynamic;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 陈璇
 * @Date 2020/7/7 10:45
 * @Version 1.0
 */
@Mapper
public interface MicroDynamicMapper {

    /**
     * 保存微动态
     * @param microDynamic
     * @return
     */
    int saveMicroDynamic(MicroDynamic microDynamic);

    /**
     * 根据ID获取微动态
     * @param id
     * @return
     */
    MicroDynamic getById(String id);

    long countMicroDynamic();

    /**
     * 分页获取微动态
     * @return
     */
    List<MicroDynamic> getMicroDynamicList(@Param("page") Integer page, @Param("size") Integer size);

    /**
     * 删除微动态
     * @param id
     * @return
     */
    int deleteMicroDynamic(String id);

    /**
     * 根据ID修改点击数量
     * @param id
     * @return
     */
    int modifyNum(@Param("id") String id, @Param("num") int num);

}
